package com.iter.devbox.juc;

import java.util.concurrent.Executor;

public class MyExecutor {
	
	public static class MyThread implements Runnable {
		@Override
		public void run() {
			System.out.println("线程执行。。。。。。");
		}
	}
	
	public static class MyInnerExecutor implements Executor {
		@Override
		public void execute(Runnable command) {
			command.run();//在当前线程中执行run方法。
		}
	}

	public static void main(String[] args) {
		Executor executor = new MyExecutor.MyInnerExecutor();
		Runnable runnable = new MyThread();
		executor.execute(runnable);
	}
}